/**
 * @brief 软件SPI配置
 */
#include "spi.h"

void software_spi_init(void)
{
    GPIO_InitTypeDef GPIO_InitStruct = {0};
    __HAL_RCC_GPIOA_CLK_ENABLE();

    HAL_GPIO_WritePin(GPIOA, LCD_BLK_PIN | LCD_CS_PIN | LCD_RST_PIN | LCD_DC_PIN | LCD_SCL_PIN | LCD_SDA_PIN, GPIO_PIN_RESET);
    GPIO_InitStruct.Pin = LCD_BLK_PIN | LCD_CS_PIN | LCD_RST_PIN | LCD_DC_PIN | LCD_SCL_PIN |
                          LCD_SDA_PIN;
    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
}

